#include "mainwindow.h"
#include <QApplication>
#include <QTextCodec>
#include <QFile>
#include "qDebug2Logcat.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <QAudioRecorder>

#include <QScreen>
#include <QAndroidJniEnvironment>
#include <QAndroidJniObject>
#include <jni.h>
//QAndroidJniObject::callStaticMethod()

int main(int argc, char *argv[])
{
//    QScreen *screen = qApp->primaryScreen();
//    screen->availableSize();

    //sockaddr_in
    installLogcatMessageHandler("yourLogTag");

    //QTextCodec::setCodecForLocale(QTextCodec::codecForName("GBK"));

    QApplication a(argc, argv);
    //加载样式表
    QFile loFile(":/qss/qss/style.qss");
    if(loFile.open(QFile::ReadOnly))
    {
       a.setStyleSheet(QString::fromUtf8(loFile.readAll()));
       loFile.close();
    }

    QAudioRecorder  audioRecorder;//::supportedAudioCodecs();
    QStringList strList = audioRecorder.supportedAudioCodecs();

    QString str =strList.join("\n");
    qDebug(str.toLocal8Bit().data());

    MainWindow w;
    w.show();

    return a.exec();
}
